home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / gt_power / udstat21.zip / UDSTATS.DOC next >
Text File  |  1990-05-07  |  15KB  |  347 lines

  1.  
  2.                       *************************************
  3.                       *                                   *
  4.                       *             UDSTATS               *
  5.                       *                                   *
  6.                       *           Version 2.1             *
  7.                       *                                   *
  8.                       *   GT 15.xx ONLY - LAN AWARE !!!!  *
  9.                       *                                   *
  10.                       *  Tested on a LANtastic Network    *
  11.                       *                                   *
  12.                       *************************************
  13.  
  14.                         A Programme for GT 15.00 Sysops
  15.                           (Of no use to anyone else)
  16.  
  17.                                John Della-Torre
  18.  
  19.                                   PO Box 169
  20.                                    Eastwood
  21.                              New South Wales 2122
  22.                                Sydney, Australia
  23.  
  24.                              GT Net/Node:  302/000
  25.  
  26.  
  27.                  The Poet's Dilemma: 61-2-804-6412  (HST Dual)
  28.                                    : 61-2-804-7449  (HST 9600)
  29.                               Voice: 61-2-804-7516
  30.  
  31.  
  32.  
  33.     WARRANY
  34.     =======
  35.  
  36.          Use this programme at your own risk.  No warranty is given.
  37.  
  38.          I wrote it to help me run my own system and I offer it  to  others
  39.          on  the  understanding  that I am not to be held responsible if it
  40.          does not work on or damages your system.
  41.  
  42.  
  43.     LICENCE and REGISTRATION
  44.     ========================
  45.  
  46.          No registration is required to use this programme - it is NOT part
  47.          of the OZNET suite of programmes.
  48.  
  49.          You may copy and  distribute  the  two  files  that  comprise  the
  50.          package  provided  you  do  not  alter  any  file;  distribute the
  51.          package using any compression technique you wish.
  52.  
  53.          The package is "Shareware" and  the  copyright  remains  with  the
  54.          author.  If  you  like  or  use  the  programme  send me a Netmail
  55.          message  or  post  an  entry  in  the  "GT<>FIDO  Gateway  and  OZ
  56.          Companions" conference.
  57.  
  58.  
  59.     HISTORY
  60.     =======
  61.  
  62.             Date          Version
  63.  
  64.          May   20, 1989    1.0
  65.          May   21, 1989    1.1 - Added the /D option
  66.          May   26, 1989    1.2 - Added the /R option
  67.          May   27, 1989    1.3 - Added /F and /C and changed /R
  68.          June  06, 1989    1.4 - Fixed problem with comma in /R
  69.                                  Recompile  needed   for   Toolkit Change.
  70.          June  11, 1989    1.5 - Fixed error where /d option was not
  71.                                  checking /r trigger value.
  72.          July  25, 1989    1.6 - Fixed error with > Limit D/L & 0 U/L
  73.          Aug   05, 1989    1.7 - Abort if in LAN environment - LAN support
  74.                                  later!
  75.          Aug   19, 1989    1.8 - Fixed miscalc of # of /Rs. Increased
  76.                                  # of /Rs from 4 to 5 and /F from 8 to 10
  77.          Sep   03, 1989    1.9 - Added LAN support.  Tested on LANtastic
  78.          Feb   05, 1990    2.0 - Added /N Option and CALLS.BBS count
  79.                                  Changed presentation of information
  80.                                  Errorlevel 2 for Upgrade, 1 for Downgrade
  81.          May   05, 1990    2.1 - Fix bug when D/L=0 and U/L>0
  82.  
  83.     PURPOSE
  84.     =======
  85.  
  86.          If you run the programme RATIOGEN, you will  have  a  file  called
  87.          RATIO.BBS   which  contains  the  accumulated  counts  of  K-Bytes
  88.          uploaded and  downloaded  for  each  caller.   GT  15.00  contains
  89.          fields  in  the USER.CTL file for K-Bytes uploaded and downloaded,
  90.          but  historical  data  is  lost  if  you  don't  have  a  way   of
  91.          initialising  those  fields.   If you've been using RATIOGEN, then
  92.          the /S option of this programme will be of use to you.
  93.  
  94.          One function of this programme (via the /S  option)  is  to  prime
  95.          the  GT  15.00  fields  with  the counts from your RATIO.BBS file.
  96.          UDSTATS will read your RATIO.BBS and STORE the upload and download
  97.          counts into the GT 15.00 fields.
  98.  
  99.          NOTE VERY WELL:  You  should  only  use  the  /S  option  ONCE  to
  100.          initialise  GT  15.00's  fields.   If  you run GT 15.00 (Beta09 or
  101.          after) then GT will update the fields itself and any execution  of
  102.          the  /S  option  of  UDSTATS will simply OVERWRITE what GT has put
  103.          there.
  104.  
  105.          You can use the display (/D) option in your  GTLOGON.BAT  file  to
  106.          show  a caller his/her upload, download k_counts and down:up ratio
  107.          together with a warning message if the ratio exceeds the value you
  108.          have specified via the /R option.
  109.  
  110.          The  /F  option  is  used  to  automatically downgrade and upgrade
  111.          callers according to the criteria specified in the /R option  and
  112.          should be used in the GTLOGOFF.BAT.
  113.  
  114.          A UDSTATS.LOG file is created - see "The UDSTATS.LOG File" section
  115.          below.  All activity is logged to this  file,  please  examine  it
  116.          regularly.
  117.  
  118.          Please  see  "How  I  Use  UDSTATS on my SYSTEM" below for further
  119.          details.
  120.  
  121.  
  122.     THE GTPATH ENVIRONMENT VARIABLE
  123.     ===============================
  124.  
  125.          The programme expects to find the GTPATH  environment  variable  -
  126.          if it's not SET, then the programme fails.
  127.  
  128.  
  129.     THE COMMAND LINE PARAMETERS
  130.     ===========================
  131.  
  132.          The syntax expected is:
  133.  
  134.          UDSTATS [/S] | [/D] | [/Ral,nn] | [/Fabcd] | [/Cnn] | [/N] | ?
  135.  
  136.          If  you  provide  no parameters, the programme will display a help
  137.          message detailing the various options.
  138.  
  139.          You may use the "-" character instead of the "/" if you wish.
  140.  
  141.          The command line options have the following meanings  and  may  be
  142.          entered in UPPER or lower case:
  143.  
  144.  
  145.     /S
  146.          STORE the values  from  RATIO.BBS  in  the  appropriate  GT  15.00
  147.          fields.  The file RATIO.BBS is expected in the directory specified
  148.          by the GTPATH environment variable.
  149.  
  150.          USE  THIS  OPTION  ONCE  TO  INITIALISE  GT  15.00'S  FIELDS  FROM
  151.          RATIO.BBS - THEN FORGET IT.
  152.  
  153.     /C
  154.          Give  this  caller  Netmail  Credits  REGARDLESS of his/her class.
  155.          Specify this as /Cnnn.  On my system I  choose  to  give  everyone
  156.          (via  the GTLOGOFF.BAT file) 5 Netmail credits.  Since new callers
  157.          are not given access to the Netmail area until I verify  them,  it
  158.          doesn't  matter  that  they  have  Netmail  credits - in fact this
  159.          technique allows them to enter Netmail as soon as I upgrade them.
  160.  
  161.     /D
  162.          DISPLAY and FORCE (see below) are mutually exclusive - only one is
  163.          allowed.
  164.  
  165.          DISPLAY  (via  the  GTLOGON.BAT)  a  caller's download, upload and
  166.          ratio  counts.   The counts displayed by this option come from the
  167.          GT fields.
  168.  
  169.     /Ral,nn
  170.  
  171.          A maximum of five /Rs are allowed.
  172.  
  173.          The  RATIO details.   Are you ready for this?  You need to specify
  174.          THREE things here:
  175.  
  176.               (a) The Access class that (l) and (nn) below apply to.
  177.               (l) The Download Limit in 1000k, ie the amount of data you
  178.                   allow  your  callers  to  take  BEFORE  ratio  monitoring
  179.                   gets triggered.  For example specify 1000k as 1 and 2000k
  180.                   as 2 etc.
  181.              (nn) The Down:Up ratio for this access level.
  182.  
  183.          For example, say you had an access level of R (for  Regulars)  and
  184.          that you allow 1000k to be downloaded before a ratio monitoring of
  185.          10:1  takes place.  Furthermore, assume that you also had a P (for
  186.          Privilege) access class where you allow  3000k  before  a  Down:Up
  187.          ratio  of 15:1 applies.   You would, to DISPLAY the details to you
  188.          callers, invoke UDSTATS as follows:
  189.  
  190.                UDSTATS  /D  /rR1,10  /rP3,15  <=<=  Place in GTLOGON.BAT
  191.  
  192.          If the caller was access level R, then as well  as  the  Download,
  193.          Upload  K-counts  and  the  Down:Up  ratio,  he/she  would also be
  194.          presented with the message:
  195.  
  196.          "Download authority is lost after 1000k is taken and your ratio
  197.          exceeds 10:1".
  198.  
  199.          If you DON'T specify a /R option for certain access levels on your
  200.          system,  then you will effectively exempt those access levels from
  201.          RATIO monitoring.  If your caller has an  access  level  that  you
  202.          have  not  enabled  via  the  multiple  /Rs,  then  he/she will be
  203.          presented with his/her statistics and the message:
  204.  
  205.          "You are exempt from ratio monitoring".
  206.  
  207.  NB =>   The  consequence  of  exempting  callers  by _not_ having a /R for
  208.          their access level means that you  really  need  the  /R  for  the
  209.          access  level  to which the caller is downgraded as well.  So, the
  210.          above example should really  say:  (assuming  S  annd  Q  are  the
  211.          "downgraded levels")
  212.  
  213.          UDSTATS /D /rR1,10 /rP3,15 /rS1,10 /rQ3,15
  214.  
  215.     /Fftftftft
  216.  
  217.          FORCE  and  DISPLAY are mutually exclusive - you can only have one
  218.          of them.  The "f" means "from" and the "t" means "to"
  219.  
  220.          FORCE  a  downgrade  (via the GTLOGOFF.BAT) from access class f to
  221.          access class t when  the  criteria  in  the  /R  option  has  been
  222.          satisfied.   The  trick  here  is  to  set  up  an access class in
  223.          GTPASSWD.BBS which does NOT have download authority but is in  all
  224.          other  respects  just  like  the  access level which does have the
  225.          download authority.  For example if you  wished  to  automatically
  226.          downgrade  your  R (Regular)  callers to S and your P (Privileged)
  227.          callers to Q you would specify:
  228.  
  229.               UDSTATS /rR1,10 /rP3,15 /fRSPQ
  230.  
  231.          Automatic upgrade takes place when the caller uploads  some  files
  232.          and brings his/her ratio below that specified in the /R option.
  233.  
  234.          A maximum of five pairs of access classes are allowed.
  235.  
  236.     /N
  237.  
  238.          Use  this  if you _don't_ want the CALLS.BBS file incremented. See
  239.          CALLS.BBS below.
  240.  
  241.      ?   Presents online help.
  242.  
  243.  
  244.     HOW THE PROGRAMME IS USED on MY SYSTEM
  245.     ======================================
  246.  
  247.          First:
  248.          ======
  249.  
  250.          I  ran  RATIOGEN  for  the last time last night to ensure that the
  251.          RATIO.BBS file was up to date.  I then  ran  the  small  BAT  file
  252.          shown below to prime the GT 15.00 upload_k and download_k fields.
  253.  
  254.          C:
  255.          CD \GT
  256.          RATIOGEN /EGT:STO:NMAIL
  257.          COPY USER.CTL USEROLD.CTL  <=<=<= Better to be safe ... etc
  258.          COPY USER.IDX USEROLD.IDX  <=<=<= Same as above
  259.          UDSTATS /S
  260.  
  261.          Now  that  the GT fields are primed, I WILL NEVER AGAIN USE THE /S
  262.          Option. It would not be very  wise  to  continue  priming  the  GT
  263.          15.00  fields  with  the  /S option now that GT is itself updating
  264.          those fields - right?
  265.  
  266.          Secondly:
  267.          =========
  268.  
  269.          In my GTLOGON.BAT file I invoke (via DOORWAY) UDSTATS as follows:
  270.  
  271.          DOORWAY /O: .. Doorway parms .. /P:UDSTATS /D /rR1,10 /rP3,15
  272.  
  273.          This provides the caller with his Download and Upload kbyte counts
  274.          together with the Down:Up ratio.  If the caller is access level  R
  275.          or  P  he/she  is told that ratio monitoring commences after 1000k
  276.          and 3000k has been downloaded and the ratio exceeds 10:1 and  15:1
  277.          respectively.
  278.  
  279.          If  the  caller  IS  NOT  R  or  P,  then the statistics are still
  280.          provided, but an additional message "You are exempt  from  ratio
  281.          ratio monitoring" is also provided.
  282.  
  283.          Thirdly:
  284.          ========
  285.  
  286.          In my GTLOGOFF.BAT file, I invoke the /F option as follows:
  287.  
  288.          UDSTATS /rR1,10 /rP3,15 /fRSPQ /C5 (This is NOT run via DOORWAY)
  289.  
  290.          The /C5 gives EVERY caller 5 Netmail Credits regardless of his/her
  291.          class.
  292.  
  293.  
  294.     THE UDSTATS.LOG FILE
  295.     ====================
  296.  
  297.          UDSTATS  produces  a  UDSTATS.LOG  file  either  in   the   GTPATH
  298.          directory  or  the  directory specified in the LO entry in GT.CNF.
  299.          If the LOG file does not exists, UDSTATS will  create  it,  if  it
  300.          does exist UDSTATS will append to it.
  301.  
  302.          It shows activity generated from the /S and /F options.
  303.  
  304.          If  you  have P & M Software's "Developer's Toolkit", then you can
  305.          use the SYSOP programme to verify that  the  GT  fields  have  the
  306.          correct  values  in  them  after  you've  run  UDSTATS with the /S
  307.          option.  Sysop Tools will also show you the stats.
  308.  
  309.  
  310.     THE CALLS.BBS FILE
  311.     ==================
  312.  
  313.          The  CALLS.BBS  file  is  a  file  created  by  one  of  Stephen's
  314.          programmes and it indicates the number of callers  you've  had  to
  315.          your  system.   It's  a  one line ASCII file with the count in it.
  316.          UDSTATS will increment this count by one if the /N option _IS NOT_
  317.          present.
  318.  
  319.          If you wish to run UDSTATS in a DOOR as well as in the GTLOGON.BAT
  320.          then you'd better place a /N along with the /D in the  GTDOORx.BAT
  321.          file, otherwise the CALLS.BBS file will be incremented _AGAIN_.
  322.  
  323.  
  324.     ERRORLEVELS
  325.     ===========
  326.  
  327.          If a caller is Upgraded  then  an  errorlevel  of  2  is  set;  if
  328.          downgraded an errorlevel of 1 is set.
  329.  
  330.          You could use TEXT2MSG with these errorlevels to send the caller a
  331.          predefined private message depending on his access level changes.
  332.  
  333.  
  334.     FINALLY (This ONLY applies if you're going from 14.03 to 15.00)
  335.     ===============================================================
  336.  
  337.          Remember, use the /S option ONCE ONLY to prime the fields with the
  338.          RATIO.BBS file.  If you have not been using RATIOGEN, then the  /S
  339.          option is OF NO USE TO YOU.
  340.  
  341.          Please  report  any   problems in the "GT<>FIDO and Oz Companions"
  342.          conference (E10/053).
  343.  
  344.     Regards, John
  345.  
  346.     +++++++++++++++++++++++  End of Document +++++++++++++++++++++++
  347.